
import myAxios from "../plugins/myAxios";
import {setCurrentUserState} from "../states/user.ts";

 const getCurrentUser=async ()=>{
    const res = await myAxios.get('/user/current');
    if (res.code==0){
        setCurrentUserState(res.data);
        return res.data
    }
    return null;
}
export {
     getCurrentUser
}